<h2>Top 10 ifrån highsorelistan</h2>
    <table cellspacing="0" style="margin-left:10px">
  	<tr>
    	<td><b>PL</b></td>
        <td></td><td></td><td></td><td></td>
        <td><b>Highscore</b></td>
        <td></td><td></td><td></td><td></td>
        <td><b>Namn</b></td>
        <td></td><td></td><td></td><td></td>
        <td><b>email</b></td>
        <td></td><td></td><td></td><td></td>
        <td><b>telefon</b></td>
    </tr>
    
<?php
	$con = mysql_connect("localhost","root","");
	
	if(!$con)
	{
		die("Det gick inte att ansluta till servern");
	}
		
	mysql_select_db("scrum", $con);
		
	$result = mysql_query("SELECT * FROM highscore ORDER BY highscore DESC LIMIT 10",$con);
	$placering = 1;
		
	while($row = mysql_fetch_array($result))
	{
		$color = "";
		if($placering % 2)
		{
			$color = "#CCC49F";
		}
		echo "
			<tr id='" . $placering . "' bgcolor='" . $color . "'>
				<td align='center'><b>" . $placering . "</b></td>
				<td></td><td></td><td></td><td></td>
				<td align='center'>" . $row['highscore'] . "</td>
				<td></td><td></td><td></td><td></td>
				<td>" . $row['namn'] . "</td>
				<td></td><td></td><td></td><td></td>
				<td>" . $row['email'] . "</td>
				<td></td><td></td><td></td><td></td>
				<td>" . $row['telefon'] . "</td>
			</tr>";
				
			$placering++;
	}
		
	mysql_close($con);
?>
</table>